/** 该文件仅存放演员模块相关的接口API */
import myaxios from "../MyAxios";
// 引入路径前缀
import BASEURL from '../BaseUrl' 
const {MOVIEURL} = BASEURL

const userApi = {
  /**
   * 登录接口
   * @param {Object} params  {username,password}
   */
  login(params){
    return myaxios.post(MOVIEURL+"/user/login", params)
  },

  /**
   * 查询所有用户
   */
  queryUsers(){
    return myaxios.get(MOVIEURL + '/movie-user')
  },

  /**
   * id查询用户
   * @param {Object} params  {userid}
   */
  queryByUserId(params){
    return myaxios.get(MOVIEURL + '/user/userid',params)
  },

  /**
   * 查询评论
   */
  queryComment(){
    return myaxios.get(MOVIEURL + '/movie-comment')
  },

  /**
   * 查询个人收藏
   */
  queryCollecting(){
    return myaxios.get(MOVIEURL + '/collecting')
  },

  /**
   * 查询观看历史
   */
  queryVideo(){
    return myaxios.get(MOVIEURL + '/video-host')
  },

}

export default userApi;